package com.easykoo.ioc.property;

import com.easykoo.ioc.Entry;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;

public class PropertyParser {
	
	public static Map<String, Object> parse(Properties properties){
		Map<String, Object> beanMap = new HashMap<String, Object>();
		for(Iterator<Object> iterator = properties.keySet().iterator(); iterator.hasNext();){
			String key = (String)iterator.next();
			String value = properties.getProperty(key);
            Entry entry = new Entry();
            entry.setId(key);
            entry.setClazz(value);
			beanMap.put(key, entry);
		}
		return beanMap;
	}

}
